package cn.kgc.ebookmanagement.controller;

import cn.kgc.ebookmanagement.pojo.Ebookcategory;
import cn.kgc.ebookmanagement.pojo.ResultEntity;
import cn.kgc.ebookmanagement.service.EbookcategoryService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class categoryController {
    @Resource
    EbookcategoryService ebookcategoryService;

    @RequestMapping("/getCategoryList")
    public ResultEntity<List<Ebookcategory>> getCategoryList(){
        List<Ebookcategory> ebookcategoryList=ebookcategoryService.selectAll();
        return  ResultEntity.successWithoutData(ebookcategoryList);
    }

}
